package com.health.article.mapper;

import com.health.article.domain.dto.ShmArticleDTO;
import com.health.article.domain.vo.ShmArticleVO;
import com.health.article.domain.vo.ShmSubjectVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleMapper {

    List<ShmArticleVO> selectArticleAll();

    void insertArticle(ShmArticleDTO shmArticleDTO);

    void insertArticleSubject(@Param("articleId") Long articleId, @Param("subjectIds") Long[] subjectIds);

    List<ShmArticleVO> selectMyDraftAndArticle(Long creatorId);

    List<ShmArticleVO> selectMyArticle(@Param("creatorId") Long creatorId, @Param("type") Long type);

    List<ShmSubjectVO> selectSubjectAll();

    ShmArticleVO selectArticleInfo(Long articleId);

    void deleteArticleById(Long articleId);

    void deleteArticleSubjectById(Long articleId);

    void updateMyDraft(ShmArticleDTO shmArticleDTO);

    Long[] selectArticleSubjectById(Long articleId);
}
